from pydantic import BaseModel
from typing import Optional
from datetime import datetime

class SponsorByGroupItem(BaseModel):
    program_code:    str
    program_year:    int
    faculty:         Optional[str]
    coop_program:    Optional[str]
    status:          str
    sponsor_count:   int

    class Config:
        from_attributes = True

class CompanyContactsItem(BaseModel):
    company_name:       str
    sponsor_contact_id: int
    title:              Optional[str]
    first_name:         Optional[str]
    last_name:          Optional[str]
    position_title:     Optional[str]
    phone:              Optional[str]
    mobile:             Optional[str]
    fax:                Optional[str]
    email:              Optional[str]
    website:            Optional[str]
    kc:                 Optional[str]
    gm:                 Optional[str]
    inv:                Optional[str]
    ss:                 Optional[str]
    lk:                 Optional[str]
    aa:                 Optional[str]
    bb:                 Optional[str]
    ec:                 Optional[str]
    last_updated:       Optional[datetime]
    archive:            Optional[str]
    hidden:             Optional[str]
    program_code:       Optional[str]
    faculty:            Optional[str]
    coop_program:       Optional[str]
    program_year:       Optional[int]
    scholarship_years:  Optional[str]
    latest_year:        Optional[int]
    status:             Optional[str]

    class Config:
        from_attributes = True

class CompanyScholarshipItem(BaseModel):
    company_name: str
    program_code: str
    program_year: int
    position: int
    total_amount_per_position: float
    sponsorship_cost: float
    status: str

    class Config:
        from_attributes = True
        
class ProgramScholarshipItem(BaseModel):
    program_code: str
    program_year: int
    faculty: Optional[str]
    coop_program: Optional[str]
    sponsor_count: float
    position: int
    total_amount_per_position: float
    sponsorship_cost: float
    status: str

    class Config:
        from_attributes = True

